// component/Ytextarea/Ytextarea.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    Ystyle: {
      type: String,
      value: ""
    },
    Yvalue:{
      type: String,
      value: ""
    },
    Yplaceholder: {
      type: String,
      value: ""
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    windowHeight: wx.getSystemInfoSync().windowHeight,
    windowWidth: wx.getSystemInfoSync().windowWidth,
    show:false,
    targetValue:''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    change:function(){
      this.setData({ show: true, targetValue: this.data.Yvalue})
    },
    cancle: function () {
      this.setData({ show: false })
    },
    confirm: function () {
      this.setData({ show: false })
      this.triggerEvent("changeValue", this.data.targetValue)
    },
    textareainput: function (e) {
      this.setData({
        targetValue:e.detail.value
      })
    },
  }
})
